/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac4.only5.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Gerard
 */
public class Booking implements Serializable {
    
    private Integer id;
    
    private String customer;
    
    private Integer space;
    
    private Date startTime;
    
    private Date endTime;
    
    private Integer pax;
    
    private String status;
    
    private Date creationTime;
    
    private List<Resource> extraResources;
    
    private Double totalPrice;
    
    private List<Payment> madePayments;
    
    private Date cancelTime;
    
    private String cancelUser;
    
    private Date recordDate;
    
    private String cancelReason;

    public String getCancelReason() {
        return cancelReason;
    }

    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }

    public Date getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    public String getCancelUser() {
        return cancelUser;
    }

    public void setCancelUser(String cancelUser) {
        this.cancelUser = cancelUser;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public List<Resource> getExtraResources() {
        return extraResources;
    }

    public void setExtraResources(List<Resource> extraResources) {
        this.extraResources = extraResources;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public List<Payment> getMadePayments() {
        return madePayments;
    }

    public void setMadePayments(List<Payment> madePayments) {
        this.madePayments = madePayments;
    }

    public Integer getPax() {
        return pax;
    }

    public void setPax(Integer pax) {
        this.pax = pax;
    }

    public Integer getSpace() {
        return space;
    }

    public void setSpace(Integer space) {
        this.space = space;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Date getRecordDate() {
        return recordDate;
    }

    public void setRecordDate(Date recordDate) {
        this.recordDate = recordDate;
    }
    
    public void addExtraResources(Resource resource){
        if(this.extraResources == null){
            this.extraResources = new ArrayList<Resource>();
        }
        this.extraResources.add(resource);
    }

}
